home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4943 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: news1.halcyon.com!coho!riston
  2. From: riston@coho.halcyon.com (Michael D. Riston)
  3. Newsgroups: comp.lang.c++
  4. Subject: Q: A Good C++ Graphics Editor Design
  5. Date: 1 Feb 1996 19:36:25 GMT
  6. Organization: Northwest Nexus Inc.
  7. Message-ID: <4er4np$84o@news1.halcyon.com>
  8. NNTP-Posting-Host: coho.halcyon.com
  9.  
  10.  
  11. Hello,
  12.  
  13. I have been charged with designing your classic C++ object oriented graphics 
  14. editor (e.g. draw a circle, square, etc).  Before I code this editor I 
  15. want to be sure that the software is designed well.  Below are the details:
  16.  
  17.    Tools
  18.    -----
  19.      Windows 95, Win32 development.
  20.      Visual C++ 4.0 using MFC.
  21.  
  22.    Some requirements
  23.    -----------------
  24.  
  25.      - Needs to draw your basic objects: square, line, etc.
  26.  
  27.      - Support on-screen text editing.
  28.  
  29.      - Will be drawing specialized bar code symbols.  These bar code
  30.        objects, support text under each bar code.  This text needs
  31.        to be selectable and editable within the bar code object.
  32.  
  33.    Questions
  34.    ---------
  35.  
  36.      1) Are there any good books/articles on designing and implementing
  37.     object oriented graphics editor(s).
  38.  
  39.      2) I have examined the MS VC++ 4.0 DRAWCLI object oriented draw example.
  40.     Is this a good example?  Are there any gotchas hidden in the
  41.     example that shows up when the design is applied to a large
  42.     scale project.
  43.  
  44.      3) With C++ it is easy to create a ShapeObject class that has virtual
  45.     viewing functions like Draw() and Update() and to contain data 
  46.     information like x and y.  To create a box one would derive a 
  47.     BoxShape from a ShapeObject class and add the extra data items, 
  48.     like width and height.
  49.  
  50.     This could be one approach to designing a shape inheritance
  51.     tree, but would it be a good idea to separate the 'Viewing'
  52.     functions into a ShapeView class (e.g BoxView), and the data 
  53.     items into a 'ShapeData' class (e.g. BoxData)?  This idea is 
  54.     basically applying the MFC doc/view design to individual shape 
  55.     objects.
  56.  
  57.   Thanks in advance.
  58.  
  59.   You can e-mail to riston@halycon.com or post.
  60.  
  61.   Mike...:)
  62.  
  63.  
  64.  
  65. --
  66. --------------------------------------------------------------------------
  67. Mike and Hilda Riston    Email  -  riston@halycon.com
  68. 21311 52nd Ave SE    Voice  -  (206) 486-5017
  69. Woodinville, WA 98072   Web    -  http://www.halcyon.com/riston/home/home.html        
  70.